package com.qingfeng.provide.controller;

import com.qingfeng.core.dao.qingfeng.SplashDao;
import com.qingfeng.core.data.ResultData;
import com.qingfeng.core.entity.qingfeng.Splash;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description: splash
 * @author:LWY
 * @date: 2017/11/17 14:39
 * @modified:
 */
@RestController
@RequestMapping("/splash")
public class SplashController {
    @Autowired
    SplashDao splashDao;


    /**
     * 获取在线的splash
     */
    @RequestMapping("/getOnline")
    public ResultData getOnline() {
        List<Splash> online = splashDao.getOnline();
        ResultData resultData = new ResultData(ResultData.SUCCESS, "成功", online);
        return resultData;
    }
}
